import { postAxios, getAxios } from '@/lib/http';

export const customerCategoryApi = {
  // 新增
  add: (data) => {
    return postAxios('/customer/category/add', data);
  },
  // 分页查询
  getList: (data) => {
    return postAxios('/customer/category/page/query', data);
  },
  // 获取所有
  getAll: () => {
    return getAxios('/customer/category/list');
  },
  // 删除
  delete: (id) => {
    return getAxios('/customer/category/delete/' + id);
  },
  // 查看邮件详情
  getDetail: (id) => {
    return getAxios('/customer/category/detail/' + id);
  },
  // 更新编辑邮件
  update: (data) => {
    return postAxios('/customer/category/update', data);
  }
};
